//
//  LGSSheetDelegate.h
//  LogicSim
//
//  Created by Jeremy Pereira on 30/04/2012.
//  Copyright (c) 2013 Jeremy Pereira. All rights reserved.
//

#import <Foundation/Foundation.h>

@class LGSName;
@class LGSSheetController;

/*!
 *  @brief Delegate for something that controls a sheet.
 *
 *  
 */
@protocol LGSSheetDelegate <NSObject>

/*!
 *  @brief return the window to attach a sheet to.
 *
 *  @param sheetController The sheet controller that will display the sheet.
 *  @return The window to attach the sheet to.
 */
-(NSWindow*) windowForSheetController: (LGSSheetController*) sheetController;

/*!
 *  @brief Get the list of names of inputs for a node at the given index.
 *  @param sheetController object making the request.
 *  @param index Index of node in the list of available nodes.
 *  @return An array of strings which are the names of the inputs.
 */
-(NSArray*) inputNamesForNodeSelectorController: (LGSSheetController*) sheetController
                              			atIndex: (size_t) index;
/*!
 *  @brief Get the list of names of outputs for the node at the given index.
 *  @param selector object making the request.
 *  @param index Index of node in the list of available nodes.
 *  @return An array of strings which are the names of the outputs.
 */
-(NSArray*) outputNamesForNodeSelectorController: (id) selector
               	               			 atIndex: (size_t) index;


/*!
 *  @brief count of nodes that we can select between
 *
 *  @param sheetController The selector that is displaying the sheet.
 *  @return the count of node items to select between
 */
-(size_t) itemCountForNodeSelectorController: (LGSSheetController*) sheetController;

/*!
 *  @brief Return the node name for the item at the selected index.
 *
 *  @param sheetController The selector that will display the sheet.
 *  @param index The index of the item that will be selected.
 *  @return A string containing the label of the selected item.
 */
-(LGSName*) nameForNodeController: (LGSSheetController*) sheetController
                          atIndex: (size_t) index;

/*!
 *  @brief Message sent if the selector operation was canceled.
 *  @param sheetController object that would have selected the node.
 */
-(void) sheetCanceled: (LGSSheetController*) sheetController;


@end
